class ApplicationController < ActionController::Base
  protect_from_forgery

#  before_filter :autorise

  def authorise
    if @_current_user.nil?
      redirect_to login_path
    end
  end

  def current_user
    @_current_user ||= sessioin[:user_id] && User.find(session[:user_id])
  end
end
